package com.xintonghua.hongyi.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 作者：wanxianyi
 * 时间：2018/1/13.
 * 包名：com.xintonghua.hongyi.bean
 */

public class PriceBean implements Parcelable {
    private int icon;
    private String name;
    private double price;

    public PriceBean(int icon, String name, double price) {
        this.icon = icon;
        this.name = name;
        this.price = price;
    }

    public int getIcon() {

        return icon;
    }

    public void setIcon(int icon) {
        this.icon = icon;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.icon);
        dest.writeString(this.name);
        dest.writeDouble(this.price);
    }

    public PriceBean() {
    }

    protected PriceBean(Parcel in) {
        this.icon = in.readInt();
        this.name = in.readString();
        this.price = in.readDouble();
    }

    public static final Parcelable.Creator<PriceBean> CREATOR = new Parcelable.Creator<PriceBean>() {
        @Override
        public PriceBean createFromParcel(Parcel source) {
            return new PriceBean(source);
        }

        @Override
        public PriceBean[] newArray(int size) {
            return new PriceBean[size];
        }
    };
}
